package com.ruoyi.project.infobaseproject.service;


import com.ruoyi.baselibrary.infobasetarget.domain.InfoBaseTarget;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.project.infobaseproject.domain.*;
import com.ruoyi.project.infobaseproject.vo.HomePVO;
import com.ruoyi.project.infobaseproject.vo.ProjectReleaseVo;
import com.ruoyi.project.infoprojecttarget.domain.InfoProjectTarget;
import com.ruoyi.project.infoprojecttarget.vo.StatistDeptVo;
import org.springframework.web.multipart.MultipartFile;


import java.math.BigInteger;
import java.util.List;
import java.util.Map;

/**
 * 项目库Service接口
 *
 * @author ruoyi
 * @date 2022-01-24
 */
public interface IInfoBaseProjectService {
    /**
     * 查询项目库
     *
     * @param id 项目库主键
     * @return 项目库
     */
    public InfoBaseProject selectInfoBaseProjectById(Long id);

    /**
     * 查询项目库列表
     *
     * @param infoBaseProject 项目库
     * @return 项目库集合
     */
    public List<InfoBaseProject> selectInfoBaseProjectList(InfoBaseProject infoBaseProject);

    /**
     * 新增项目库
     *
     * @param infoBaseProject 项目库
     * @return 结果
     */
    public int insertInfoBaseProject(InfoBaseProject infoBaseProject);

    /**
     * 修改项目库
     *
     * @param infoBaseProject 项目库
     * @return 结果
     */
    public int updateInfoBaseProject(InfoBaseProject infoBaseProject);

    /**
     * 批量删除项目库
     *
     * @param ids 需要删除的项目库主键集合
     * @return 结果
     */
    public int deleteInfoBaseProjectByIds(Long[] ids);

    /**
     * 删除项目库信息
     *
     * @param id 项目库主键
     * @return 结果
     */
    public int deleteInfoBaseProjectById(Long id);

    /**
     * 查询子项目  实体中 传父项目的id  parentId=id
     * @param parentProject
     * @return
     */
    List<InfoBaseProject> selectInfoBaseChildProjectList(InfoBaseProject parentProject);

    /**
     * 不区分父子项目查询
     * @param infoBaseProject
     * @return
     */
    List<InfoBaseProject> selectInfoBaseProjects(InfoBaseProject infoBaseProject);

    /**
     * 项目下达
     * @param projectReleaseVo
     * @return
     */
    int projectRelease(ProjectReleaseVo projectReleaseVo);


    int insertInfoBaseProjects(ProjectVo projectVo);

    List<InfoBaseProject>  importExcel(MultipartFile file) throws Exception;

    /**
     * 主管处室查询项目信息
     * @param infoBaseProject
     * @return
     */
    List<InfoBaseProject> selectInfoBaseProjectListByDepartmentId(InfoBaseProject infoBaseProject);

    List<InfoBaseProject> selectInfoBaseProject(Long id,String date);

    List<InfoBaseProject> selectInfoBaseProjectByIds(Long id);

   /* *//**
     * 获取执行数及执行率
     *//*
    void getTotalEx(InfoBaseProject infoBaseProject);*/

    /**
     * 获取执行数及执行率
     */
    void getInfo(InfoBaseProject infoBaseProject);

    /**
     * 首页统计一二级项目数
     */
    List<TjProjectVo> selectInfoBaseProjectss();

    /**
     * 首页统计一二级项目数（new）
     */
    List<TjProjectVo> selectInfoProjects();

    /**
     * 首页获取金额统计信息
     * @param deptId
     * @return
     */
    Map<String,Object> getHomeStatisticsAmount(Long deptId);

    /**
     * 根据一级项目id查询二级项目名称
     * @param
     * @return
     */
    List<Map<String,Object>> getSecondProjectList(BigInteger projectId);

    /**
     * 根据一级项目id,项目名称查询部门二级项目信息
     * @param
     * @return
     */
    List<InfoBaseProject> getProjectDepartmentList(BigInteger parentId,String projectName);

    /**
     * 手动添加项目库
     * @param
     * @return
     */
    void handAddProject(InfoBaseProject infoBaseProject);

    /**
     * 查询父级项目名称
     * @param
     * @return
     */
    String getParentProjectName(Long projectId);


    /**
     * 提交
     * @param infoBaseProject
     * @return
     */
    String submitProject(InfoBaseProject infoBaseProject);

    AjaxResult examineProject(InfoBaseProject infoBaseProject);

    List<InfoBaseProject> selectInfoBaseProjectsTb(InfoBaseProject infoBaseProject);

    List<InfoBaseProject> selectInfoBaseProjectsSh(InfoBaseProject infoBaseProject);

    HomePVO selectHomePage();

    List<HomePVO> selecttypePercentage();

    List<HomePVO> selectmonthlySumAndTotal(String year);

    List<HomePVO> selectprojectType(String year);

    AjaxResult implementProject(InfoBaseProject infoBaseProject);


    List<StatistDeptVo> selectInfoStatistDeept(InfoProjectTarget projectTarget);

    AjaxResult applyAdjust(InfoProjectTargetAdjust infoProjectTargetAdjust);


    AjaxResult examineAdjust(InfoProjectTargetAdjust infoProjectTargetAdjust);

    AjaxResult adjustProject(InfoBaseProject infoBaseProject);

    AjaxResult examineAdjustProject(InfoBaseProject infoBaseProject);
}
